#!/bin/sh
# Copyright (c) Ruslan Mikhaylenko mirusnet@gmail.com 07.12.2011 

echo "DATE\t  REV"
DATES=`awk '$9=="DIFFERENCE:" {print $1}' repl.log | sort | uniq`

for D in ${DATES}; do
        awk -v DD=${D}  '$1==DD {i+=$10} END {print DD " " i}' repl.log
	done | awk '{ count+=$2; row++;  print} END {print "Replicated revisions: " count "\tDays: " row "\tAverage " count/row " rev/day"}'

